home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Disc to the Future 2
/
Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin
/
MAC
/
THINKC
/
4_0
/
LISTMANA
/
__TESTER
/
TESTERUT.C
< prev
next >
Wrap
Text File
|
1989-06-25
|
2KB
|
87 lines
/**** */
/**** Code Testing System version 1.0 (beta) */
/**** */
/**** All portions of this source code are the property of Jack */
/**** Herrington. I, Jack Herrington, give you permission to use */
/**** use or alter the code in any way that pleases you. You must */
/**** however return by whatever means avaliable any improvements */
/**** you believe significant to Jack Herrington, accepting that */
/**** these improvements might be contained in later releases of */
/**** the code. I also grant you permission to remove this header */
/**** from any file you are WORKING on, as long as you put it back */
/**** when you're stopped WORKING on it. */
/**** */
/**** Jack Herrington: University Of Miami, Biomedical Computing */
/**** 1600 N.W. 10th Ave. (R-53) */
/**** (305) 547-6538 */
/**** */
/****/
/**** Tester utilities */
/****/
#include "ListManager.h"
#include "Tester.h"
/****/
/**** Draw the fake grow handle */
/****/
void DrawFakeGrow(Window)
WindowPtr Window;
{
GrafPtr port;
PicPtr growBox;
Rect frame;
int length,width;
GetPort(&port);
if(growBoxHandle==0L)return;
HLock(growBoxHandle);
growBox=(PicPtr)*growBoxHandle;
length = growBox->picFrame.right - growBox->picFrame.left;
width = growBox->picFrame.bottom - growBox->picFrame.top;
frame.top = ( port->portRect.bottom - width ) + 1;
frame.bottom = ( port->portRect.bottom ) + 1;
frame.left = ( port->portRect.right - length ) + 1;
frame.right = ( port->portRect.right ) + 1;
HUnlock(growBoxHandle);
if ( Window == FrontWindow() ) DrawPicture(growBoxHandle,&frame);
else EraseRect(&frame);
}
/****/
/**** Run a dialog */
/****/
void RunDialog(resID)
int resID;
{
DialogPtr dialog;
Handle item;
Rect box;
int type,hit;
/**** Get the dialog */
if((dialog=GetNewDialog(resID,0L,-1L))==0L)return;
/**** Frame the first item */
SetPort(dialog);
GetDItem(dialog,1,&type,&item,&box);
InsetRect(&box,-4,-4);
PenSize(3,3);
FrameRoundRect(&box,16,16);
PenSize(1,1);
/**** Run the modal dialog */
ModalDialog(0L,&hit);
DisposDialog(dialog);
}